import 'package:osc/models/entity/osc_author.dart';

class OscMessageLetterEntity {
	OscAuthor sender;
	int id;
	int type;
	String pubDate;
	String content;

	OscMessageLetterEntity({this.sender, this.id, this.type, this.pubDate, this.content});

	OscMessageLetterEntity.fromJson(Map<String, dynamic> json) {
		sender = json['sender'] != null ? new OscAuthor.fromJson(json['sender']) : null;
		id = json['id'];
		type = json['type'];
		pubDate = json['pubDate'];
		content = json['content'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.sender != null) {
      data['sender'] = this.sender.toJson();
    }
		data['id'] = this.id;
		data['type'] = this.type;
		data['pubDate'] = this.pubDate;
		data['content'] = this.content;
		return data;
	}
}
